Completed
Push — master ( 5cd775...78bef9 )
by Jonathan
14:29 queued 04:27
created

detail.js ➔ constructor   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
export class Detail {
2
    constructor() {
3
        this.autoDisplayApiCapabilities()
4
    }
5
6
    autoDisplayApiCapabilities() {
7
        let globalApiTotalCount = $("#permissions-table td.for-api").length
8
        let globalApiCheckedCount = $("#permissions-table td.for-api[data-checked='true']").length
9
10
        if (globalApiCheckedCount > 0 && globalApiTotalCount !== globalApiCheckedCount) {
11
            $("#permissions-table .for-api").removeClass('hide')
12
        }
13
    }
14
}